Left Termination of the query pattern div_in_3(g, g, a) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

le(0, Y, true).
le(s(X), 0, false).
le(s(X), s(Y), B) :- le(X, Y, B).
minus(X, 0, X).
minus(s(X), s(Y), Z) :- minus(X, Y, Z).
div(X, s(Y), Z) :- ','(le(s(Y), X, B), if(B, X, s(Y), Z)).
if(false, X, s(Y), 0).
if(true, X, s(Y), s(Z)) :- ','(minus(X, Y, U), div(U, s(Y), Z)).

Queries:

div(g,g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
div_in: (b,b,f)
le_in: (b,b,f)
if_in: (b,b,b,f)
minus_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 6 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MINUS_IN_GGA(s(X), s(Y)) → MINUS_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

LE_IN_GGA(s(X), s(Y)) → LE_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)

The TRS R consists of the following rules:

minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x4)
false  =  false
true  =  true
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x2, x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(Y, minus_in_gga(X, Y))
U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(Y, minus_in_gga(X, Y)) at position [1] we obtained the following new rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X)) at position [2] we obtained the following new rules:

DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(false))
U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U5_GGGA(Y, minus_out_gga(U)) → DIV_IN_GGA(U, s(Y)) we obtained the following new rules:

U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
QDP
                                    ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(false))
U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U3_GGA(X, Y, le_out_gga(B)) → IF_IN_GGGA(B, X, s(Y)) we obtained the following new rules:

U3_GGA(0, z0, le_out_gga(false)) → IF_IN_GGGA(false, 0, s(z0))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
QDP
                                        ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U3_GGA(0, z0, le_out_gga(false)) → IF_IN_GGGA(false, 0, s(z0))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(false))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
QDP
                                            ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(le_in_gga(x0, x1))) we obtained the following new rules:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, U1_gga(le_in_gga(0, x0)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
QDP
                                                ↳ Rewriting
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, U1_gga(le_in_gga(0, x0)))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, U1_gga(le_in_gga(0, x0))) at position [2,0] we obtained the following new rules:

DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, U1_gga(le_out_gga(true)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
QDP
                                                    ↳ Rewriting
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, U1_gga(le_out_gga(true)))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, U1_gga(le_out_gga(true))) at position [2] we obtained the following new rules:

DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
QDP
                                                        ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U3_GGA(s(z0), z1, le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(z1)) we obtained the following new rules:

U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
QDP
                                                            ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
QDP
                                                                  ↳ ForwardInstantiation
                                                                ↳ QDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U5_GGGA(s(z1), minus_out_gga(x1)) → DIV_IN_GGA(x1, s(s(z1))) we obtained the following new rules:

U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
                                                                  ↳ ForwardInstantiation
QDP
                                                                      ↳ ForwardInstantiation
                                                                ↳ QDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1)))
U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U3_GGA(s(z0), s(z1), le_out_gga(x2)) → IF_IN_GGGA(x2, s(z0), s(s(z1))) we obtained the following new rules:

U3_GGA(s(x0), s(x1), le_out_gga(true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
                                                                  ↳ ForwardInstantiation
                                                                    ↳ QDP
                                                                      ↳ ForwardInstantiation
QDP
                                                                          ↳ QDPOrderProof
                                                                ↳ QDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
U3_GGA(s(x0), s(x1), le_out_gga(true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))
U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x1), U2_gga(minus_in_gga(x0, x1)))
The remaining pairs can at least be oriented weakly.

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
U3_GGA(s(x0), s(x1), le_out_gga(true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))
U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( true ) =
/0
0/

M( minus_out_gga(x1) ) =
/0
0/
+
/01
01/
·x1

M( false ) =
/0
0/

M( minus_in_gga(x1, x2) ) =
/0
0/
+
/01
01/
·x1+
/00
00/
·x2

M( U2_gga(x1) ) =
/0
0/
+
/10
10/
·x1

M( 0 ) =
/0
0/

M( s(x1) ) =
/0
1/
+
/01
01/
·x1

M( U1_gga(x1) ) =
/0
0/
+
/00
00/
·x1

M( le_in_gga(x1, x2) ) =
/0
0/
+
/00
00/
·x1+
/00
00/
·x2

M( le_out_gga(x1) ) =
/0
0/
+
/00
00/
·x1

Tuple symbols:
M( U5_GGGA(x1, x2) ) = 0+
[0,0]
·x1+
[0,1]
·x2

M( DIV_IN_GGA(x1, x2) ) = 1+
[1,0]
·x1+
[0,0]
·x2

M( IF_IN_GGGA(x1, ..., x3) ) = 0+
[0,0]
·x1+
[0,1]
·x2+
[0,0]
·x3

M( U3_GGA(x1, ..., x3) ) = 1+
[1,0]
·x1+
[0,0]
·x2+
[0,0]
·x3


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
                                                                  ↳ ForwardInstantiation
                                                                    ↳ QDP
                                                                      ↳ ForwardInstantiation
                                                                        ↳ QDP
                                                                          ↳ QDPOrderProof
QDP
                                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(s(z0))) → U3_GGA(s(x0), s(z0), U1_gga(le_in_gga(s(z0), x0)))
U3_GGA(s(x0), s(x1), le_out_gga(true)) → IF_IN_GGGA(true, s(x0), s(s(x1)))
U5_GGGA(s(x0), minus_out_gga(s(y_0))) → DIV_IN_GGA(s(y_0), s(s(x0)))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 3 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
QDP
                                                                  ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X)
minus_in_gga(s(X), s(Y)) → U2_gga(minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(false)
le_in_gga(s(X), s(Y)) → U1_gga(le_in_gga(X, Y))
U2_gga(minus_out_gga(Z)) → minus_out_gga(Z)
U1_gga(le_out_gga(B)) → le_out_gga(B)
le_in_gga(0, Y) → le_out_gga(true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
                                                                ↳ QDP
                                                                  ↳ UsableRulesProof
QDP
                                                                      ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))

R is empty.
The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0)
U1_gga(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
                                                                ↳ QDP
                                                                  ↳ UsableRulesProof
                                                                    ↳ QDP
                                                                      ↳ QReductionProof
QDP
                                                                          ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(0, minus_out_gga(x0)) we obtained the following new rules:

IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
                                                                ↳ QDP
                                                                  ↳ UsableRulesProof
                                                                    ↳ QDP
                                                                      ↳ QReductionProof
                                                                        ↳ QDP
                                                                          ↳ Instantiation
QDP
                                                                              ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U5_GGGA(0, minus_out_gga(z0)) → DIV_IN_GGA(z0, s(0)) we obtained the following new rules:

U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Instantiation
                                  ↳ QDP
                                    ↳ Instantiation
                                      ↳ QDP
                                        ↳ DependencyGraphProof
                                          ↳ QDP
                                            ↳ Instantiation
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Instantiation
                                                          ↳ QDP
                                                            ↳ DependencyGraphProof
                                                              ↳ AND
                                                                ↳ QDP
                                                                ↳ QDP
                                                                  ↳ UsableRulesProof
                                                                    ↳ QDP
                                                                      ↳ QReductionProof
                                                                        ↳ QDP
                                                                          ↳ Instantiation
                                                                            ↳ QDP
                                                                              ↳ Instantiation
QDP
                                                                                  ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))
U3_GGA(s(z0), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0), s(0))
IF_IN_GGGA(true, s(z0), s(0)) → U5_GGGA(0, minus_out_gga(s(z0)))
U5_GGGA(0, minus_out_gga(s(z0))) → DIV_IN_GGA(s(z0), s(0))

The TRS R consists of the following rules:none


s = U3_GGA(s(z0), 0, le_out_gga(true)) evaluates to t =U3_GGA(s(z0), 0, le_out_gga(true))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U3_GGA(s(z0), 0, le_out_gga(true))IF_IN_GGGA(true, s(z0), s(0))
with rule U3_GGA(s(z0'), 0, le_out_gga(true)) → IF_IN_GGGA(true, s(z0'), s(0)) at position [] and matcher [z0' / z0]

IF_IN_GGGA(true, s(z0), s(0))U5_GGGA(0, minus_out_gga(s(z0)))
with rule IF_IN_GGGA(true, s(z0'), s(0)) → U5_GGGA(0, minus_out_gga(s(z0'))) at position [] and matcher [z0' / z0]

U5_GGGA(0, minus_out_gga(s(z0)))DIV_IN_GGA(s(z0), s(0))
with rule U5_GGGA(0, minus_out_gga(s(z0'))) → DIV_IN_GGA(s(z0'), s(0)) at position [] and matcher [z0' / z0]

DIV_IN_GGA(s(z0), s(0))U3_GGA(s(z0), 0, le_out_gga(true))
with rule DIV_IN_GGA(s(x0), s(0)) → U3_GGA(s(x0), 0, le_out_gga(true))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
div_in: (b,b,f)
le_in: (b,b,f)
if_in: (b,b,b,f)
minus_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x1, x2, x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
DIV_IN_GGA(X, s(Y), Z) → LE_IN_GGA(s(Y), X, B)
LE_IN_GGA(s(X), s(Y), B) → U1_GGA(X, Y, B, le_in_gga(X, Y, B))
LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_GGA(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
IF_IN_GGGA(true, X, s(Y), s(Z)) → MINUS_IN_GGA(X, Y, U)
MINUS_IN_GGA(s(X), s(Y), Z) → U2_GGA(X, Y, Z, minus_in_gga(X, Y, Z))
MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → U6_GGGA(X, Y, Z, div_in_gga(U, s(Y), Z))
U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
U6_GGGA(x1, x2, x3, x4)  =  U6_GGGA(x1, x2, x4)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x1, x2, x4)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x1, x2, x4)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 6 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

MINUS_IN_GGA(s(X), s(Y), Z) → MINUS_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
MINUS_IN_GGA(x1, x2, x3)  =  MINUS_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

MINUS_IN_GGA(s(X), s(Y)) → MINUS_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LE_IN_GGA(s(X), s(Y), B) → LE_IN_GGA(X, Y, B)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LE_IN_GGA(x1, x2, x3)  =  LE_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LE_IN_GGA(s(X), s(Y)) → LE_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)

The TRS R consists of the following rules:

div_in_gga(X, s(Y), Z) → U3_gga(X, Y, Z, le_in_gga(s(Y), X, B))
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
U3_gga(X, Y, Z, le_out_gga(s(Y), X, B)) → U4_gga(X, Y, Z, if_in_ggga(B, X, s(Y), Z))
if_in_ggga(false, X, s(Y), 0) → if_out_ggga(false, X, s(Y), 0)
if_in_ggga(true, X, s(Y), s(Z)) → U5_ggga(X, Y, Z, minus_in_gga(X, Y, U))
minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U5_ggga(X, Y, Z, minus_out_gga(X, Y, U)) → U6_ggga(X, Y, Z, div_in_gga(U, s(Y), Z))
U6_ggga(X, Y, Z, div_out_gga(U, s(Y), Z)) → if_out_ggga(true, X, s(Y), s(Z))
U4_gga(X, Y, Z, if_out_ggga(B, X, s(Y), Z)) → div_out_gga(X, s(Y), Z)

The argument filtering Pi contains the following mapping:
div_in_gga(x1, x2, x3)  =  div_in_gga(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x1, x2, x4)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x2, x4)
if_in_ggga(x1, x2, x3, x4)  =  if_in_ggga(x1, x2, x3)
false  =  false
if_out_ggga(x1, x2, x3, x4)  =  if_out_ggga(x1, x2, x3, x4)
true  =  true
U5_ggga(x1, x2, x3, x4)  =  U5_ggga(x1, x2, x4)
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U6_ggga(x1, x2, x3, x4)  =  U6_ggga(x1, x2, x4)
div_out_gga(x1, x2, x3)  =  div_out_gga(x1, x2, x3)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U5_GGGA(X, Y, Z, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y), Z)
IF_IN_GGGA(true, X, s(Y), s(Z)) → U5_GGGA(X, Y, Z, minus_in_gga(X, Y, U))
DIV_IN_GGA(X, s(Y), Z) → U3_GGA(X, Y, Z, le_in_gga(s(Y), X, B))
U3_GGA(X, Y, Z, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y), Z)

The TRS R consists of the following rules:

minus_in_gga(X, 0, X) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y), Z) → U2_gga(X, Y, Z, minus_in_gga(X, Y, Z))
le_in_gga(s(X), 0, false) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y), B) → U1_gga(X, Y, B, le_in_gga(X, Y, B))
U2_gga(X, Y, Z, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, B, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y, true) → le_out_gga(0, Y, true)

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
le_in_gga(x1, x2, x3)  =  le_in_gga(x1, x2)
0  =  0
le_out_gga(x1, x2, x3)  =  le_out_gga(x1, x2, x3)
U1_gga(x1, x2, x3, x4)  =  U1_gga(x1, x2, x4)
false  =  false
true  =  true
minus_in_gga(x1, x2, x3)  =  minus_in_gga(x1, x2)
minus_out_gga(x1, x2, x3)  =  minus_out_gga(x1, x2, x3)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x1, x2, x4)
U5_GGGA(x1, x2, x3, x4)  =  U5_GGGA(x1, x2, x4)
DIV_IN_GGA(x1, x2, x3)  =  DIV_IN_GGA(x1, x2)
IF_IN_GGGA(x1, x2, x3, x4)  =  IF_IN_GGGA(x1, x2, x3)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x1, x2, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))
IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(X, Y, minus_in_gga(X, Y))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
U3_GGA(X, Y, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule IF_IN_GGGA(true, X, s(Y)) → U5_GGGA(X, Y, minus_in_gga(X, Y)) at position [2] we obtained the following new rules:

IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
U3_GGA(X, Y, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule DIV_IN_GGA(X, s(Y)) → U3_GGA(X, Y, le_in_gga(s(Y), X)) at position [2] we obtained the following new rules:

DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(s(x0), 0, false))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP

Q DP problem:
The TRS P consists of the following rules:

IF_IN_GGGA(true, s(x0), s(s(x1))) → U5_GGGA(s(x0), s(x1), U2_gga(x0, x1, minus_in_gga(x0, x1)))
IF_IN_GGGA(true, x0, s(0)) → U5_GGGA(x0, 0, minus_out_gga(x0, 0, x0))
DIV_IN_GGA(0, s(x0)) → U3_GGA(0, x0, le_out_gga(s(x0), 0, false))
DIV_IN_GGA(s(x1), s(x0)) → U3_GGA(s(x1), x0, U1_gga(x0, x1, le_in_gga(x0, x1)))
U5_GGGA(X, Y, minus_out_gga(X, Y, U)) → DIV_IN_GGA(U, s(Y))
U3_GGA(X, Y, le_out_gga(s(Y), X, B)) → IF_IN_GGGA(B, X, s(Y))

The TRS R consists of the following rules:

minus_in_gga(X, 0) → minus_out_gga(X, 0, X)
minus_in_gga(s(X), s(Y)) → U2_gga(X, Y, minus_in_gga(X, Y))
le_in_gga(s(X), 0) → le_out_gga(s(X), 0, false)
le_in_gga(s(X), s(Y)) → U1_gga(X, Y, le_in_gga(X, Y))
U2_gga(X, Y, minus_out_gga(X, Y, Z)) → minus_out_gga(s(X), s(Y), Z)
U1_gga(X, Y, le_out_gga(X, Y, B)) → le_out_gga(s(X), s(Y), B)
le_in_gga(0, Y) → le_out_gga(0, Y, true)

The set Q consists of the following terms:

minus_in_gga(x0, x1)
le_in_gga(x0, x1)
U2_gga(x0, x1, x2)
U1_gga(x0, x1, x2)

We have to consider all (P,Q,R)-chains.